<?php  

if ($_GET['data'] && ($_GET['token'] == "doubleq")) 
		{
        	
    	$con = mysql_connect(SAE_MYSQL_HOST_M.':'.SAE_MYSQL_PORT,SAE_MYSQL_USER,SAE_MYSQL_PASS); 
        
    	$data = $_GET['data'];
        
    	mysql_select_db("app_cchome", $con);
 		
        $result = mysql_query("SELECT * FROM switch");
        
    
    	while($arr = mysql_fetch_array($result))
        {
                if ($arr['ID'] == 1) 
                
                {
                        $state = $arr['state'];
                }
        }
        
    	$dati = date("h:i:sa");
        
    	mysql_close($con);
        
    	echo "*".$state."}";
}
		else
		{
        echo null;
        }
 
?>